package com.lantosec.hmrp.modules.morality.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

import com.lantosec.hmrp.modules.morality.entity.MoralityPlan;
import com.lantosec.hmrp.core.mvc.BaseVO;
import com.lantosec.hmrp.modules.morality.entity.MoralityPlanItem;
import com.lantosec.hmrp.modules.morality.entity.MoralityPlanLevel;
import com.lantosec.hmrp.modules.morality.entity.MoralityPlanTarget;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 考评方案 VO对象
 * </p>
 *
 * @author AutoCode
 * @since 2020-04-16
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="MoralityPlan对象", description="考评方案")
public class MoralityPlanVO extends BaseVO<MoralityPlan> {
    private static final long serialVersionUID = 1L;


    public MoralityPlanVO(MoralityPlan entity){
        this.moralityPlanId = entity.getMoralityPlanId();
        this.moralityPlanName = entity.getMoralityPlanName();
        this.moralityCycleId = entity.getMoralityCycleId();
        this.branchStep = entity.getBranchStep();
        this.state = entity.getState();
        this.createUserId = entity.getCreateUserId();
        this.createUser = entity.getCreateUser();
        this.createTime = entity.getCreateTime();
        this.editorUserId = entity.getEditorUserId();
        this.editorUser = entity.getEditorUser();
        this.editorTime = entity.getEditorTime();
    }

    @Override
    public MoralityPlan convertToEntity(){
        return new MoralityPlan(this);
    }


    @ApiModelProperty(value = "考评方案ID")
    @TableId(value = "morality_plan_id", type = IdType.AUTO)
    private Integer moralityPlanId;

    @ApiModelProperty(value = "考评方案名称")
    private String moralityPlanName;

    @ApiModelProperty(value = "方案周期ID")
    private Integer moralityCycleId;

    @ApiModelProperty(value = "考评流程是否有党支部环节(0否 1是)")
    private Integer branchStep;

    @ApiModelProperty(value = "方案状态(1暂停 2启用 3到期 4作废)")
    private Integer state;

    @ApiModelProperty(value = "创建人ID")
    private String createUserId;

    @ApiModelProperty(value = "创建人")
    private String createUser;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "最后编辑人ID")
    private String editorUserId;

    @ApiModelProperty(value = "最后编辑人")
    private String editorUser;

    @ApiModelProperty(value = "最后编辑时间")
    private Date editorTime;

    @ApiModelProperty(value = "考评周期名称")
    private String moralityCycleName;
    @ApiModelProperty(value = "考评基础项目列表")
    private List<MoralityPlanItem> moralityPlanItemList;
    @ApiModelProperty(value = "考评加减分项目列表")
    private List<MoralityPlanItem> moralityPlanItemList1;
    @ApiModelProperty(value = "被考评对象列表")
    private List<MoralityPlanTarget> moralityPlanTargetList;
    @ApiModelProperty(value = "考评方案等级")
    private List<MoralityPlanLevel> moralityPlanLevels;
}
